# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=md2gemini
pkgver=1.9.1
pkgrel=1
pkgdesc="converter from Markdown to the Gemini text format"
#arch="noarch" # archived upstream, need Mistune 2.x
url="https://github.com/makeworld-the-better-one/md2gemini"
license="LGPL-3.0-or-later"
depends="py3-cjkwrap py3-wcwidth py3-mistune"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/makeworld-the-better-one/md2gemini/archive/v$pkgver.tar.gz"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install  --prefix=/usr --root="$pkgdir"
	rm -rf "$pkgdir"/usr/lib/python3*/site-packages/tests
}

sha512sums="
c066d8e8d2a0d784b140b778b988dd78793e4ae1735b9534f354283f8c24e7a20ec517aafeeea00029db5e8da166a38f3fa4d410389de05feafc96405b47eee9  md2gemini-1.9.1.tar.gz
"
